package main

import (
	"customer/api"
	"customer/cmd/pub"
	"customer/cmd/sub"
	"customer/config"
	"customer/inits"
	"github.com/gin-gonic/gin"
)

func main() {
	config.Init()
	inits.MysqlInit()
	//队列初始化
	inits.InitRabbitMq()
	//消息队列
	go sub.Sub()
	//公告
	go pub.Pub()

	router := gin.Default()

	//图片上传
	router.Static("/upload", "D:\\gowork\\src\\customer\\static\\upload\\")

	api.LoadRouters(router)

	router.Run() // 监听并在 0.0.0.0:8080 上启动服务
}
